//
//  MyHeadView.m
//  CollectionViewTest
//
//  Created by cnbizMedia on 16/4/14.
//  Copyright © 2016年 wen. All rights reserved.
//

#import "MyHeadView.h"

@interface MyHeadView()

@property (strong, nonatomic) UILabel *label;

@end

@implementation MyHeadView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        self.label = [[UILabel alloc] init];
        self.label.font = [UIFont systemFontOfSize:20];
        
        UIView *aahd = [[UIView alloc]init];
        [aahd setFrame:CGRectMake(0, 0, 555, 45)];
        aahd.backgroundColor = [UIColor whiteColor];
        [aahd addSubview:self.label];
        
        [self addSubview:aahd];
    }
    return self;
}

- (void) setLabelText:(NSString *)text
{
    self.label.text = text;
    [self.label sizeToFit];
}

@end